package anoaop.service;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.lang.reflect.Method;

/**
 * @author oldliu
 * @since 1.0
 */
public class AopTest {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("aop2.xml");
        UserService userService = ac.getBean("userService", UserService.class);
        int add = userService.add(100, "杨自强", "113333");
        System.out.println(">>>>>>>>>>>>"+add);

        int del=userService.del(2);
        System.out.println("第一次删除："+del);
         del=userService.del(3);
        System.out.println("第二次删除的结果："+del);
    }
}
